package com.web.common.iot.mqtt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import javax.validation.constraints.NotBlank;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhouhui
 * @since 2024-01-05
 */
@Getter
@Setter
@TableName("mqtt_user")
@Schema(title = "MqttUser对象", description = "")
public class MqttUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 主键 */
    @Schema(title = "主键")
    @TableId(value = "main_id", type = IdType.AUTO)
    private Integer mainId;

    /** 客户端的id */
    @NotBlank(message = "未填写客户端的id")
    @Schema(title = "客户端的id")
    private String clientId;

    /** 用户名（可以当成分组使用） */
    @NotBlank(message = "未填写客户端名称")
    @Schema(title = "用户名（可以当成分组使用）")
    private String username;

    /** 密码 */
    @Schema(title = "密码")
    private String password;

    /** 是否是超级管理员，0否；1是 */
    @Schema(title = "是否是超级管理员，0否；1是")
    private Integer isSuperuser;
    
    /** 在线状态，0未在线；1在线 */
    @Schema(title = "在线状态，0未在线；1在线")
    private Integer online;

    /** 创建时间 */
    @Schema(title = "创建时间")
    private LocalDateTime createTime;


}
